// pages/search/search.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    goods: [
      {
        img: "../../img/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "../../img/issale_07.png"
      },
      {
        img: "../../img/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: ""
      },
      {
        img: "../../img/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: ""
      },
      {
        img: "../../img/a_30_03.png",
        name: "飞利浦（PHILIPS）迷你车载充电器快充",
        price: "69.0",
        issale: "../../img/issale_07.png"
      }
    ]
  },
  clickurl: function (e) {
    var that = this;
    var id = e.currentTarget.dataset.id;
    console.log(id)
    wx.navigateTo({
      url: '../goodsDetails/goodsDetails?id=' + id,
    })
  },
  //商品搜索
  search:function(){
    let that = this;
    wx.request({
      url: '',  
      data: {
 
      },
      success: function (res) {
        console.log(res.data)
      }
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})